package com.example.provider.service.impl;

import bean.request.TestDto;
import bean.response.TestVo;
import com.example.provider.dao.TestMapper;
import com.example.provider.entity.Test;
import com.example.provider.service.TestService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Description
 *
 * @author zhuwenqiang
 * @data
 */

@Service
public class TestServiceImp implements TestService {

    @Autowired
    private TestMapper testMapper;

    @Override
    public int add(TestDto testDto) {
        Test test = new Test();
        BeanUtils.copyProperties(testDto,test);
        int insert = testMapper.addall(test);
        return insert;
    }

    @Override
    public TestVo search(TestDto testDto) {
//        Example example = new Example(Test.class);
//        Example.Criteria criteria =example.createCriteria();
        return null;
    }

}
